package sbt.selenium.lesson3;

import org.testng.annotations.Test;
import sbt.selenium.model.Film;
import sbt.selenium.model.User;

public class AddNewFilm extends sbt.selenium.pages.TestBase {
	
	@Test
	public void AddNewFilmOK(){
		Film film = new Film().setTitle("The Big Bang Theory").setYear("2005");
		app.getUserHelper().loginAs(new User().setLogin("admin").setPassword("admin"));
		app.getFilmHelper().createFilmOK(film);
		app.getUserHelper().logout();
	}
	
	@Test
	public void AddNewFilmNO(){
		Film film = new Film().setTitle("").setYear("mmm");
		app.getUserHelper().loginAs(new User().setLogin("admin").setPassword("admin"));
		app.getFilmHelper().createFilmNO(film);
		app.getUserHelper().logout();
	}

}
